﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using XXX.Models.XXXEntities;
using XXX.Bo;
using Yonyou.U8.BO;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace XXX.api.Controllers
{
    /// <summary>
    /// 获取待扫描信息
    /// </summary>
    [Route("api/wms/[controller]/[action]")]
    [ApiController]
    //[Authorize]
    public class ST_WorkListController : ControllerBase
    {
        //private readonly IKuCunReqRepository _invRepository;
        private readonly ILogger<ST_WorkListController> _logger;
        private readonly WorkListVM _workList;
        
        /// <summary>
        /// 获取到货单信息
        /// </summary>
        public ST_WorkListController(ILogger<ST_WorkListController> logger, WorkListVM workListVM)
        {
            //_invRepository = xxxRepository;
            _logger = logger;
            _workList = workListVM;
        }

        /// <summary>
        /// 根据pda界面获取待扫描信息
        /// </summary>
        /// <param name="cType">pda界面</param>
        /// <param name="ccode"></param>
        /// <returns></returns>
        [HttpGet]
        public Models.RetModel2 GetEntityList(string cType,string cWhcode, string cCode)
        {
            Models.RetModel2 ret = _workList.GetEntityList(cType,cWhcode,cCode);

            return ret;
            //return ReturnStd.Success(jsonstr);
        }


        /// <summary>
        /// 根据pda界面获取待扫描信息
        /// </summary>
        /// <param name="cType">pda界面</param>
        /// <param name="ccode"></param>
        /// <returns></returns>
        [HttpGet]
        public Models.RetModel2 GetEntity(string cType,  string cCode)
        {
            Models.RetModel2 ret = _workList.GetEntity(cType,  cCode);

            return ret;
            //return ReturnStd.Success(jsonstr);
        }
    }


     
     




        
     
    
   
     
    

    
    

}
